<?php

//header("Content-type: text/html; charset=utf-8");

//$str='🤓 小虎?123sfds';
//preg_match_all('/[\x{4e00}-\x{9fff}]+/u', $str, $matches);
//echo preg_replace("/[^\x{4e00}-\x{9fa5}]/iu",'',$str);
//$str = join('', $matches[0]);
//echo $str2;


/* function replaceSpecialChar($strParam){
    //$regex = "/|\🤓|\/|\~|\!|\@|\#|\\$|\%|\^|\&|\*|\(|\)|\_|\+|\{|\}|\:|\<|\>|\?|\[|\]|\,|\.|\/|\;|\'|\`|\-|\=|\\\|\|/";
    $regex = "/|\🤓|\/|\?|/";
    return preg_replace($regex, "", $strParam);
}
//$str = "🤓abcde~!@#$%^&*()_+{}:|<>?,./;'[]\-=`xtz";
$str='🤓 小虎?123sdfa#@$';
$str = replaceSpecialChar($str);
echo "$str\n"; */



/* $arr = array('lng'=>'113.408062', 'lat'=>'113.408034');
echo json_encode($arr); */

/* $nearby_person = array(2104078);
$rand_userid_key = array_rand($nearby_person, 1);
var_dump($rand_userid_key);die; */

/* $a=array("red","green","blue","yellow","brown");
$random_keys=array_rand($a,1);
var_dump($random_keys); */

$redis = new Redis();
$redis->connect('127.0.0.1',6379);
//$redis->set('name','leesin');
$arr = $redis->keys('wei_*');
foreach ($arr as $k => $v){
    echo $v.'---'.$redis->get($v);
    echo PHP_EOL;
}
